package com.dq.ad;

import android.content.Context;
import android.util.Log;

import com.hx.currency.HXCurrencySDK;
import com.qq.e.o.data.HttpUtil;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;

/**
 * FileName: UMManager
 * Author: admin
 * Date: 2020/10/27 13:38
 * Description:
 */
public class UMManager {

    /**
     * 友盟初始化
     *
     * @param c
     * @param um_key
     * @param um_channel
     */
    public static void init(Context c, String um_key, String um_channel) {
        Log.e("UMManager", "初始化友盟:" + um_channel);
        UMConfigure.init(c, um_key, um_channel, UMConfigure.DEVICE_TYPE_PHONE, null);
        UMConfigure.setProcessEvent(true);
        UMConfigure.setLogEnabled(true);
    }

    /**
     * 友盟预初始化
     *
     * @param c
     * @param um_key
     * @param um_channel
     */
    public static void preInit(Context c, String um_key, String um_channel) {
        Log.e("UMManager", "预初始化友盟:" + um_channel);
        UMConfigure.preInit(c, um_key, um_channel);
    }

    /**
     * 自定义事件
     *
     * @param event_id
     */
    public static void onEvent(String event_id) {
        Log.e("UMManager", "上传金币系统自定义事件:" + event_id);
//        MobclickAgent.onEvent(c, event_id);
        HXCurrencySDK.getInstance().sendAppEventLog(event_id, new HttpUtil.HttpUtilCallback() {
            @Override
            public void onSuccess(int i, String s) {
                Log.e("UMManager", "广告上传自定义事件结果:" + s);
            }

            @Override
            public void onFailed(int i, Throwable throwable) {
                Log.e("UMManager", "广告上传自定义事件结果:" + throwable.getMessage());
            }
        });
    }

    public static class Event {
        public static final String TC_exchange = "TC_exchange";//碎片宝箱_成功兑换数
        public static final String TC_EW_click = "TC_EW_click";//碎片宝箱_打开兑换窗口
        public static final String TC_receive = "TC_receive"; //碎片宝箱_点击开启
        public static final String TC_eject = "TC_eject"; //碎片宝箱_到达时间窗口弹出

        public static final String luckdraw_click = "luckdraw_click";//打开抽奖窗口
        public static final String task_click = "task_click"; //打开任务列表
        public static final String resurrection_click = "resurrection_click"; //点击复活保持连对
        public static final String IS_click = "IS_click"; //插屏广告_总点击次数
        public static final String IS_success = "IS_success";//插屏广告_总加载成功
        public static final String SF_NA_click = "SF_NA_click"; //天降红包_原生广告_点击
        public static final String SF_NA_success = "SF_NA_success";//天降红包_原生广告_加载成功
        public static final String answers_num_error = "answers_num_error"; //答题_答错数
        public static final String answers_num_correct = "answers_num_correct"; //答题_答对数

        public static final String Sign_9 = "Sign_9"; //领取第九天签到奖励
        public static final String Sign_8 = "Sign_8"; //领取第八天签到奖励
        public static final String Sign_7 = "Sign_7"; //领取第七天签到奖励
        public static final String Sign_6 = "Sign_6"; //领取第六天签到奖励
        public static final String Sign_5 = "Sign_5"; //领取第五天签到奖励
        public static final String Sign_4 = "Sign_4"; //领取第四天签到奖励
        public static final String Sign_3 = "Sign_3"; //领取第三天签到奖励
        public static final String Sign_2 = "Sign_2"; //领取第二天签到奖励
        public static final String Sign_1 = "Sign_1"; //领取第一天签到奖励
        public static final String Sign_open = "Sign_open"; //签到窗口打开次数

        public static final String Unlock_classification5 = "Unlock_classification5"; //解锁明星娱乐题库
        public static final String Unlock_classification4 = "Unlock_classification4"; //解锁影视相关题库
        public static final String Unlock_classification3 = "Unlock_classification3"; //解锁动漫世界题库
        public static final String Unlock_classification2 = "Unlock_classification2"; //解锁诗词天地题库
        public static final String Unlock_classification1 = "Unlock_classification1"; //解锁脑筋急转弯题库
        public static final String classification_window = "classification_window"; //打开分类题库窗口

        public static final String Cashcow_Redenvelopes = "Cashcow_Redenvelopes";  //摇钱树红包_提现至微信
        public static final String receive_Cashcow = "receive_Cashcow";  //点击_摇钱树_获取分红
        public static final String open_Cashcow = "open_Cashcow";  //打开摇钱树界面

        public static final String answers_num = "answers_num";  //答题数
        public static final String answers_CG_1 = "answers_CG_1";  //答题数大于1的用户
        public static final String answers_CG_5 = "answers_CG_5";  //答题数大于5的用户
        public static final String answers_CG_10 = "answers_CG_10"; //答对大于10的用户数
        public static final String answers_CG_20 = "answers_CG_20";  //答题数大于20的用户
        public static final String answers_CG_30 = "answers_CG_30";  //答题数大于30的用户
        public static final String answers_CG_50 = "answers_CG_50";  //答题数大于50的用户
        public static final String answers_CG_100 = "answers_CG_100";//答对大于100的用户数
        public static final String answers_CG_200 = "answers_CG_200"; //答对大于200的用户数
        public static final String Splash_Ad_fail = "Splash_Ad_fail";  //开屏广告加载失败
        public static final String luckdraw_open = "luckdraw_open";  //点击开始抽奖
        public static final String task_receive = "task_receive";  //领取任务奖励
        public static final String SF_NA_fail = "SF_NA_fail";  //过关红包_原生广告_加载失败
        public static final String SF_IV_success = "SF_IV_success";  //过关红包_激励视频_加载成功
        public static final String SF_IV_fail = "SF_IV_fail";  //过关红包_激励视频_加载失败

        public static final String NW_success = "NW_success"; //领取新人奖励
        public static final String TC_obtain = "TC_obtain"; //碎片宝箱_获取碎片
        public static final String SF_open = "SF_open"; //过关红包_点击翻倍
        public static final String SF_click_giveup = "SF_click_giveup"; //过关红包_点击狠心放弃
        public static final String SF_click_close = "SF_click_close"; //过关红包_点击右上角关闭
        public static final String accelerate_Cashcow = "accelerate_Cashcow"; //点击_摇钱树_加速分红
        public static final String SF_falseclose_trigger = "SF_falseclose_trigger"; //假关闭触发次数

        public static final String Withdrawal_click_1 = "Withdrawal_click_1"; //点击0.3元提现
        public static final String Withdrawal_click_2 = "Withdrawal_click_2"; //点击0.5元提现
        public static final String Withdrawal_click_3 = "Withdrawal_click_3"; //点击1元提现
        public static final String Withdrawal_click_4 = "Withdrawal_click_4"; //点击3元提现
        public static final String Withdrawal_click_5 = "Withdrawal_click_5"; //点击5元提现
        public static final String Withdrawal_click_6 = "Withdrawal_click_6"; //点击10元提现
        public static final String Withdrawal_click_7 = "Withdrawal_click_7"; //点击30元提现
        public static final String Withdrawal_click_8 = "Withdrawal_click_8"; //点击50元提现
        public static final String Withdrawal_click_9 = "Withdrawal_click_9"; //点击100元提现
        public static final String Withdrawal_success_1 = "Withdrawal_success_1"; //0.3元提现成功
        public static final String Withdrawal_success_2 = "Withdrawal_success_2"; //0.5元提现成功
        public static final String Withdrawal_success_3 = "Withdrawal_success_3"; //1元提现成功
        public static final String Withdrawal_success_4 = "Withdrawal_success_4"; //3元提现成功
        public static final String Withdrawal_success_5 = "Withdrawal_success_5"; //5元提现成功
        public static final String Withdrawal_success_6 = "Withdrawal_success_6"; //10元提现成功
        public static final String Withdrawal_click_Insufficient = "Withdrawal_click_Insufficient"; //点击提现（余额不足）

        public static final String receive_Dailyprize_1 = "receive_Dailyprize_1"; //领取第一档每日大奖
        public static final String receive_Dailyprize_2 = "receive_Dailyprize_2"; //领取第二档每日大奖

        public static final String Supplement_Hongbao1 = "Supplement_Hongbao1"; //点击补充红包
        public static final String Supplement_Hongbao2 = "Supplement_Hongbao2"; //余额不足_补充红包
        public static final String Download_matrixsoftware = "Download_matrixsoftware"; //下载矩阵软件

        public static final String Click_purse = "Click_purse"; //点击我的钱包
        public static final String WithdrawalsHongbao_eject = "WithdrawalsHongbao_eject"; //提现奖励红包_弹出
        public static final String WithdrawalsHongbao_Receive = "WithdrawalsHongbao_Receive"; //提现奖励红包_领取
        public static final String Bind_WeChat = "Bind_WeChat"; //新人绑定微信
        public static final String NewcomerHongbao_fail = "NewcomerHongbao_fail"; //请求新人红包失败
        public static final String NewcomerHongbao_succeed = "NewcomerHongbao_succeed"; //请求新人红包成功
        public static final String NewcomerHongbao_End = "NewcomerHongbao_End"; //点击新人红包_开始赚钱

        public static final String open_Gameplay = "open_Gameplay"; //打开游戏试玩界面
        public static final String Into_Gameplay = "Into_Gameplay"; //进入游戏试玩平台
        public static final String GameWithdrawal_success = "GameWithdrawal_success"; //试玩游戏提现成功
        public static final String GameWithdrawal_fail = "GameWithdrawal_fail"; //试玩游戏提现失败

        public static final String Receive_SurpriseHongbao = "Receive_SurpriseHongbao"; //领取惊喜红包
        public static final String Receive_PiggyBankHongbao = "Receive_PiggyBankHongbao"; //领取存钱罐红包
        public static final String Click_BubbleHongbao = "Click_BubbleHongbao"; //点击气泡红包
        public static final String Receive_BubbleHongbao = "Receive_BubbleHongbao"; //领取气泡红包

        public static final String update_Download = "update_Download"; //下载更新
        public static final String update_ignore = "update_ignore"; //忽略更新
        public static final String update_DownloadSucceed = "update_DownloadSucceed"; //更新包下载成功

        public static final String Click_Invite = "Click_Invite"; //点击立即邀请
        public static final String InvitationRewards_success_1 = "InvitationRewards_success_1"; //第一档邀请提现成功
        public static final String InvitationRewards_success_2 = "InvitationRewards_success_2"; //第二档邀请提现成功
        public static final String InvitationRewards_success_3 = "InvitationRewards_success_3"; //第三档邀请提现成功
        public static final String InvitationRewards_success_4 = "InvitationRewards_success_4"; //第四档邀请提现成功
        public static final String InvitationRewards_success_5 = "InvitationRewards_success_5"; //第五档邀请提现成功
        public static final String InvitationRewards_success_6 = "InvitationRewards_success_6"; //第六档邀请提现成功

        public static final String IncentiveValidations_num = "IncentiveValidations_num"; //激励验证总次数
        public static final String IncentiveValidations_num_correct = "IncentiveValidations_num_correct"; //激励验证成功次数
    }
}